<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="使用虚拟机安装 OpenWRT, 湮灭星空,博客,Python,后端">
    <meta name="description" content="使用虚拟机安装 OpenWRT
本文主要介绍在 Mac 上使用 Parallels Desktop 安装 OpenWRT。
视频教程地址：https://www.youtube.com/watch?v=TpJHpsx0V2Y&amp;amp;t=3">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <title>使用虚拟机安装 OpenWRT | 湮灭星空</title>
    <link rel="icon" type="image/png" href="/favicon.png">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery.min.js"></script>

<link rel="alternate" href="/atom.xml" title="湮灭星空" type="application/atom+xml">
</head>

<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper head-container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">湮灭星空</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言板</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友链</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>

<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">湮灭星空</div>
        <div class="logo-desc">
            
            天下寥寥，苍生涂涂，诸子百家，唯我纵横
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友链
		</a>
          
        </li>
        
        
    </ul>
</div>

        </div>

        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/15.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <div class="description center-align post-title">
                        使用虚拟机安装 OpenWRT
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        margin: 35px 0 15px 0;
        padding-left: 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #toc-content .is-active-link::before {
        background-color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/linux/">
                                <span class="chip bg-color">linux</span>
                            </a>
                        
                            <a href="/tags/mac/">
                                <span class="chip bg-color">mac</span>
                            </a>
                        
                            <a href="/tags/openwrt/">
                                <span class="chip bg-color">openwrt</span>
                            </a>
                        
                            <a href="/tags/Parallels-Desktop/">
                                <span class="chip bg-color">Parallels Desktop</span>
                            </a>
                        
                            <a href="/tags/%E8%99%9A%E6%8B%9F%E6%9C%BA/">
                                <span class="chip bg-color">虚拟机</span>
                            </a>
                        
                            <a href="/tags/vmware/">
                                <span class="chip bg-color">vmware</span>
                            </a>
                        
                            <a href="/tags/vmware-workstation-pro/">
                                <span class="chip bg-color">vmware workstation pro</span>
                            </a>
                        
                            <a href="/tags/vmware-fusion/">
                                <span class="chip bg-color">vmware fusion</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/Tech/" class="post-category">
                                Tech
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2020-02-13
                </div>
                

                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-check fa-fw"></i>更新日期:&nbsp;&nbsp;
                    2020-02-16
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    999
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    3 分
                </div>
                
				
                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
            
        </div>
        <hr class="clearfix">
        <div class="card-content article-card-content">
            <div id="articleContent">
                <h1 id="使用虚拟机安装-openwrt"><a class="header-anchor" href="#使用虚拟机安装-openwrt"></a>使用虚拟机安装 OpenWRT</h1>
<p>本文主要介绍在 Mac 上使用 <code>Parallels Desktop</code> 安装 <code>OpenWRT</code>。</p>
<p>视频教程地址：<a href="https://www.youtube.com/watch?v=TpJHpsx0V2Y&amp;t=309s" target="_blank" rel="noopener">https://www.youtube.com/watch?v=TpJHpsx0V2Y&amp;t=309s</a></p>
<h2 id="下载-openwrt-固件"><a class="header-anchor" href="#下载-openwrt-固件"></a>下载 OpenWRT 固件</h2>
<h3 id="官网下载"><a class="header-anchor" href="#官网下载"></a>官网下载</h3>
<p>OpenWRT 官网下载地址：<a href="https://downloads.openwrt.org/releases/" target="_blank" rel="noopener">https://downloads.openwrt.org/releases/</a></p>
<h3 id="国内镜像源下载"><a class="header-anchor" href="#国内镜像源下载"></a>国内镜像源下载</h3>
<p>清华源镜像地址：<a href="https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/" target="_blank" rel="noopener">https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/</a></p>
<p>中科大镜像地址：<a href="https://mirrors.ustc.edu.cn/lede/" target="_blank" rel="noopener">https://mirrors.ustc.edu.cn/lede/</a></p>
<p>本次使用的清华源 <code>OpenWRT 19.07.1</code> 最新的版本，下载地址为 <a href="https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.1/targets/x86/64/openwrt-19.07.1-x86-64-combined-ext4.img.gz" target="_blank" rel="noopener">https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.1/targets/x86/64/openwrt-19.07.1-x86-64-combined-ext4.img.gz</a>。</p>
<h2 id="解压固件并改名"><a class="header-anchor" href="#解压固件并改名"></a>解压固件并改名</h2>
<p>使用默认的解压方式就可以将固件解压，解压后改名为 <code>3.hdd</code>。</p>
<blockquote>
<p>名字可以随意改，文件格式要改成 <code>hdd</code> 以供 <code>Parallels Desktop</code> 使用。</p>
</blockquote>
<h2 id="新建-parallels-desktop-虚拟机"><a class="header-anchor" href="#新建-parallels-desktop-虚拟机"></a>新建 Parallels Desktop 虚拟机</h2>
<h3 id="新建空白-linux"><a class="header-anchor" href="#新建空白-linux"></a>新建空白 Linux</h3>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091046.png" alt="image-20200213171046674"></p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091201.png" alt="image-20200213171200671"></p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091239.png" alt="image-20200213171239320"></p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091314.png" alt="image-20200213171314369"></p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091426.png" alt="image-20200213171426043"></p>
<h3 id="删除默认的硬件配置"><a class="header-anchor" href="#删除默认的硬件配置"></a>删除默认的硬件配置</h3>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091633.png" alt="image-20200213171633093"></p>
<h3 id="配置cpu-与内存"><a class="header-anchor" href="#配置cpu-与内存"></a>配置CPU 与内存</h3>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091736.png" alt="image-20200213171735728"></p>
<h3 id="配置网络"><a class="header-anchor" href="#配置网络"></a>配置网络</h3>
<p><code>OpenWRT</code> 的默认地址是 <code>192.168.1.1</code>，如果你的本地网络占用了这个地址的话，那么需要在 <code>Parallels Desktop</code> 的偏好设置中新建 <code>Host-Only</code> 网络供 <code>OpenWRT</code> 使用，使用空闲网段，比如图中使用的是 <code>224</code> 网段。</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-091943.png" alt="image-20200213171943687"></p>
<p>另外为了通过路由器获得一个跟本机电脑 macOS 同网段的 IP，还需要创建一个网络，配置为<strong>默认适配器</strong>就可以了，如下图</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-092439.png" alt="image-20200213172439096"></p>
<h3 id="配置硬盘"><a class="header-anchor" href="#配置硬盘"></a>配置硬盘</h3>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-092834.png" alt="image-20200213172834316"></p>
<h3 id="启动虚拟机"><a class="header-anchor" href="#启动虚拟机"></a>启动虚拟机</h3>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-092919.png" alt="image-20200213172919722"></p>
<h3 id="更改-ip-地址"><a class="header-anchor" href="#更改-ip-地址"></a>更改 IP 地址</h3>
<p>如果之前在配置网络的时候，新建了其他网段的 <code>Host-Only</code> 网络给 <code>OpenWRT </code> 使用的话，那么在这一步需要更改 <code>OpenWRT</code> 的 <code>IP</code> 地址。</p>
<pre><code class="language-shell">cd /etc/config 
vi network
</code></pre>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-093409.png" alt="image-20200213173408766"></p>
<p>保存并退出 <code>vi </code> 编辑。</p>
<h3 id="重启-openwrt-系统"><a class="header-anchor" href="#重启-openwrt-系统"></a>重启 OpenWRT  系统</h3>
<pre><code class="language-shell">reboot
</code></pre>
<h2 id="测试"><a class="header-anchor" href="#测试"></a>测试</h2>
<p>在浏览器访问 <code>192.168.224.1</code> 得到如下界面表示安装成功。第一次无需密码直接点击 <code>Login</code> 登录。进入后在设置 <code>root</code> 密码。</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-13-093655.png" alt="image-20200213173654927"></p>
<h2 id="遇到的问题"><a class="header-anchor" href="#遇到的问题"></a>遇到的问题</h2>
<p>再删除这个虚拟机之后，再次新建虚拟机安装挂载硬盘的时候，总是出现无法正确识别硬盘的情况，或者选中硬盘之后会自动跳成之前使用过的硬盘（但是之前硬盘已经删除，不在文件系统内），出现这种情况的原因是缓存问题，退出 <code>Parallels Desktop</code> ，使用 <code>cleanmymac</code> 清楚系统缓存之后就可以正常挂载了。</p>
<p>在 <code>koolshare</code> 官网上针对虚拟机安装有专门的固件，请下载虚拟机专用固件，否则会出现 <code>Parallels Desktop</code> 无法识别硬盘的情况。</p>
<h2 id="其他虚拟机安装-openwrt"><a class="header-anchor" href="#其他虚拟机安装-openwrt"></a>其他虚拟机安装 OpenWRT</h2>
<p>下面文章中使用的固件并不是官网的固件而是 <code>koolshare</code> 网站上的 <code>OpenWRT LEDE</code> 固件，<code>Web</code> 界面可能有所不同，但是虚拟机安装的步骤都是一样的。安装过程与一般的创建虚拟机过程大致相同，有两点需要注意：</p>
<h3 id="硬盘"><a class="header-anchor" href="#硬盘"></a>硬盘</h3>
<p>都是使用现有磁盘（也就是 <code>OpenWRT</code> 固件）</p>
<h3 id="虚拟机网络设置"><a class="header-anchor" href="#虚拟机网络设置"></a>虚拟机网络设置</h3>
<h4 id="vmware-workstation-pro"><a class="header-anchor" href="#vmware-workstation-pro"></a>VMware workstation pro</h4>
<p><code>VMware workstation pro</code> 是 <code>windows</code> 平台的虚拟机软件，使用它安装 <code>OpenWRT</code> 的时候网络选择桥接模式，一定要勾上 <strong>复制物理网络连接状态</strong>，</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-16-122217.png" alt="image-20200216202217461"></p>
<h4 id="vmware-fusion"><a class="header-anchor" href="#vmware-fusion"></a>VMware Fusion</h4>
<p><code>VMware Fusion</code> 是 <code>Mac</code> 下的虚拟机软件，使用它安装 <code>OpenWRT</code> 的时候网络适配器选择 <strong>桥接模式网络连接-自动检测</strong> 。</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-16-123236.png" alt="image-20200216202514605"></p>
<h3 id="修改-ip-地址"><a class="header-anchor" href="#修改-ip-地址"></a>修改 IP 地址</h3>
<p>启动虚拟机之后需要手动修改 IP 地址：</p>
<pre><code class="language-shell">vi /etc/config/network
</code></pre>
<p>默认 IP 地址是 <code>192.168.1.1</code> ，可以修改成本机电脑同网段的其他空闲地址，比如本机 IP 地址为 <code>192.168.3.4</code>，此时 IP 地址可以改为 <code>192.168.3.20</code>。</p>
<h3 id="设置网关和-dns-服务器"><a class="header-anchor" href="#设置网关和-dns-服务器"></a>设置网关和 DNS 服务器</h3>
<p>然后浏览器访问 <code>192.168.3.20</code>，登录 LEDE，在 <code>网络-接口</code> 中设置 <code>OpenWRT</code> 的网关和 <code>DNS</code> 服务器。不设置网关无法上网。</p>
<p><img src="https://klause-blog-pictures.oss-cn-shanghai.aliyuncs.com/ipic/2020-02-16-123228.png" alt="image-20200216203228313"></p>
<p>（上图界面主题是 LEDE 默认主题）</p>

<div id="gitalk-container"></div>
<script src="https://cdn.bootcss.com/blueimp-md5/2.12.0/js/md5.min.js"></script><link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css"><script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>

		<script>
		var gitalkConfig = {"clientID":"9eb5bc3ac1e1ff3ddac0","clientSecret":"4b7ae28042282281295075c2bf0c97ff1791cfeb","repo":"HexoBlogComments","owner":"Annihilater","admin":["Annihilater"],"distractionFreeMode":false};
	    gitalkConfig.id = md5(location.pathname);
		var gitalk = new Gitalk(gitalkConfig);
	    gitalk.render("gitalk-container");
	    </script>
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://www.klause.cn" rel="external nofollow noreferrer">湮灭星空</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://www.klause.cn/2020/02/13/openwrt/zai-mac-shang-shi-yong-parallels-desktop-xu-ni-ji-an-zhuang-shi-yong-openwrt/">https://www.klause.cn/2020/02/13/openwrt/zai-mac-shang-shi-yong-parallels-desktop-xu-ni-ji-an-zhuang-shi-yong-openwrt/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="https://www.klause.cn" target="_blank">湮灭星空</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/linux/">
                                    <span class="chip bg-color">linux</span>
                                </a>
                            
                                <a href="/tags/mac/">
                                    <span class="chip bg-color">mac</span>
                                </a>
                            
                                <a href="/tags/openwrt/">
                                    <span class="chip bg-color">openwrt</span>
                                </a>
                            
                                <a href="/tags/Parallels-Desktop/">
                                    <span class="chip bg-color">Parallels Desktop</span>
                                </a>
                            
                                <a href="/tags/%E8%99%9A%E6%8B%9F%E6%9C%BA/">
                                    <span class="chip bg-color">虚拟机</span>
                                </a>
                            
                                <a href="/tags/vmware/">
                                    <span class="chip bg-color">vmware</span>
                                </a>
                            
                                <a href="/tags/vmware-workstation-pro/">
                                    <span class="chip bg-color">vmware workstation pro</span>
                                </a>
                            
                                <a href="/tags/vmware-fusion/">
                                    <span class="chip bg-color">vmware fusion</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">
    
    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
        </div>
    </div>

    

    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2020/02/13/openwrt/openwrt-jie-mian-she-zhi-zhong-wen/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/1.jpg" class="responsive-img" alt="OpenWRT 界面设置中文">
                        
                        <span class="card-title">OpenWRT 界面设置中文</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            OpenWRT 界面设置中文
OpenWRT 中文包名为：luci-i18n-base-zh-cn
页面安装
在 System -&gt; Software 页面搜索中文包名 luci-i18n-base-zh-cn 安装，如下图

命令安
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2020-02-13
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/Tech/" class="post-category">
                                    Tech
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/linux/">
                        <span class="chip bg-color">linux</span>
                    </a>
                    
                    <a href="/tags/openwrt/">
                        <span class="chip bg-color">openwrt</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2020/02/13/openwrt/openwrt-huan-guo-nei-yuan/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/16.jpg" class="responsive-img" alt="OpenWRT 换国内源（清华源、中科大源、教育网源）">
                        
                        <span class="card-title">OpenWRT 换国内源（清华源、中科大源、教育网源）</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            OpenWRT 换国内源
OpenWRT 的官方服务器设在国外，国内的访问速度有时并不理想，可以通过镜像源的方法得以解决。
以下罗列一些常用的国内镜像源地址供大家使用：
中国科技大学教育网官方主镜像网站：
http://mirrors.us
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2020-02-13
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/Tech/" class="post-category">
                                    Tech
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/linux/">
                        <span class="chip bg-color">linux</span>
                    </a>
                    
                    <a href="/tags/openwrt/">
                        <span class="chip bg-color">openwrt</span>
                    </a>
                    
                    <a href="/tags/%E6%8D%A2%E6%BA%90%EF%BC%8C%E6%B8%85%E5%8D%8E%E6%BA%90/">
                        <span class="chip bg-color">换源，清华源</span>
                    </a>
                    
                    <a href="/tags/%E4%B8%AD%E7%A7%91%E5%A4%A7%E6%BA%90/">
                        <span class="chip bg-color">中科大源</span>
                    </a>
                    
                    <a href="/tags/%E5%9B%BD%E5%86%85%E6%BA%90/">
                        <span class="chip bg-color">国内源</span>
                    </a>
                    
                    <a href="/tags/%E6%95%99%E8%82%B2%E7%BD%91%E6%BA%90/">
                        <span class="chip bg-color">教育网源</span>
                    </a>
                    
                    <a href="/tags/sed/">
                        <span class="chip bg-color">sed</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>

    
<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


<!-- 代码块折行 -->

<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre !important; }
</style>

    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            // headingsOffset: -205,
            headingSelector: 'h2, h3, h4, h5, h6'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4, h5, h6').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>



    <footer class="page-footer bg-color">
    <div class="container row center-align">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            <span id="year">年份</span>
            <a href="https://www.klause.cn" target="_blank">湮灭星空</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
            &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
                class="white-color">199.2k</span>&nbsp;字
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <span id="sitetime">载入运行时间...</span>
            <script>
                function siteTime() {
                    window.setTimeout("siteTime()", 1000);
                    var seconds = 1000;
                    var minutes = seconds * 60;
                    var hours = minutes * 60;
                    var days = hours * 24;
                    var years = days * 365;
                    var today = new Date();
                    var startYear = "2019";
                    var startMonth = "6";
                    var startDate = "28";
                    var startHour = "0";
                    var startMinute = "0";
                    var startSecond = "0";
                    var todayYear = today.getFullYear();
                    var todayMonth = today.getMonth() + 1;
                    var todayDate = today.getDate();
                    var todayHour = today.getHours();
                    var todayMinute = today.getMinutes();
                    var todaySecond = today.getSeconds();
                    var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                    var diff = t2 - t1;
                    var diffYears = Math.floor(diff / years);
                    var diffDays = Math.floor((diff / days) - diffYears * 365);
                    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                        minutes);
                    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                        diffMinutes * minutes) / seconds);
                    if (startYear == todayYear) {
                        document.getElementById("year").innerHTML = todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffDays + " 天 " + diffHours +
                            " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    } else {
                        document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffYears + " 年 " + diffDays +
                            " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    }
                }
                setInterval(siteTime, 1000);
            </script>
            
            <br>
            
            <span id="icp"><img src="/medias/icp.png" style="vertical-align: text-bottom;" />
                <a href="http://www.beian.miit.gov.cn" target="_blank">皖ICP备18005729号-1</a>
            </span>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/Annihilater" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:yanmiexingkong@gmail.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>





    <a href="https://twitter.com/" class="tooltipped" target="_blank" data-tooltip="关注我的Twitter: https://twitter.com/" data-position="top" data-delay="50">
        <i class="fab fa-twitter"></i>
    </a>







    <a href="https://www.zhihu.com/" class="tooltipped" target="_blank" data-tooltip="关注我的知乎: https://www.zhihu.com/" data-position="top" data-delay="50">
        <i class="fab fa-zhihu1">知</i>
    </a>



    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>

</div>
    </div>
</footer>

<div class="progress-bar"></div>

    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
$(function () {
    searchFunc("/" + "search.xml", 'searchInput', 'searchResult');
});
</script>
    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Global site tag (gtag.js) - Google Analytics -->


    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    

    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>
    
    
    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
